package cn.stylefeng.guns.modular.feature.mapper;

import cn.stylefeng.guns.modular.feature.entity.Feature;
import cn.stylefeng.guns.modular.feature.model.params.FeatureParam;
import cn.stylefeng.guns.modular.feature.model.result.FeatureResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 功能表 Mapper 接口
 * </p>
 *
 * @author jalor
 * @since 2019-10-20
 */
public interface FeatureMapper extends BaseMapper<Feature> {

    /**
     * 获取列表
     *
     * @author jalor
     * @Date 2019-10-20
     */
    List<FeatureResult> customList(@Param("paramCondition") FeatureParam paramCondition);

    /**
     * 获取map列表
     *
     * @author jalor
     * @Date 2019-10-20
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") FeatureParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author jalor
     * @Date 2019-10-20
     */
    Page<FeatureResult> customPageList(@Param("page") Page page, @Param("paramCondition") FeatureParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author jalor
     * @Date 2019-10-20
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page,
                                                @Param("paramCondition") FeatureParam paramCondition);

    /**
     * 获取所有功能集合
     *
     * @param productId 产品ID
     * @param code      编号
     * @param name      名称
     * @return 功能集合
     */
    List<Feature> listAll(@Param("productId") String productId,
                          @Param("code") String code,
                          @Param("name") String name);
}
